from apps import create_app
from apps.models.base import db
from apps.models.user import User

if __name__ == '__main__':
    app = create_app()

    with app.app_context():
        with db.auto_commit():
            user = User()
            user.nickname = 'admin'
            user.auth = 2
            user.email = 'admin@qq.com'
            user.password = '781066'
            db.session.add(user)
